// Magic Software, Inc.
// http://www.magic-software.com
// Copyright (c) 2000, All Rights Reserved
//
// Source code from Magic Software is supplied under the terms of a license
// agreement and may not be copied or disclosed except in accordance with the
// terms of that agreement.  The various license agreements may be found at
// the Magic Software web site.  This file is subject to the license
//
// RESTRICTED USE SOURCE CODE
// http://www.magic-software.com/License/restricted.pdf

#ifndef MGCPARTICLES_H
#define MGCPARTICLES_H

#include "MgcPolypoint.h"

class MgcParticles : public MgcPolypoint
{
    MgcDeclareRTTI;
    MgcDeclareStream;

public:
    // Construction and destruction.  MgcParticles accepts responsibility for
    // deleting the input arrays.
    MgcParticles (unsigned int uiVertexQuantity, MgcVector3* akVertex,
        MgcVector3* akNormal, MgcColor* akColor, bool bUseTexture,
        MgcReal* afSize);

    virtual ~MgcParticles ();

    // member access
    MgcReal* Sizes ();
    const MgcReal* Sizes () const;
    bool& UseTexture ();
    const bool& UseTexture () const;

    // The particle sizes are considered to be relative measurements.  The
    // sizes must be adjusted to allow particles to appear large or small
    // depending on the application's needs.  The initial value is 1.0.
    MgcReal& SizeAdjust ();
    const MgcReal& SizeAdjust () const;

protected:
    MgcParticles ();

    // drawing
    virtual void Draw (MgcRenderer& rkRenderer);

    MgcReal* m_afSize;
    MgcReal m_fSizeAdjust;
    bool m_bUseTexture;
};

MgcSmartPointer(MgcParticles);
MgcRegisterStream(MgcParticles);
#include "MgcParticles.inl"

#endif
